package com.zyf.test2;

public class Test {
	public static void main(String[] args) {
		Computer c = new Computer();
		String cpuBrand = new CPUFactory().getCPUBrand();
		String cpuFrequency = new CPUFactory().getCPUFrequency();
		
		CPU cpu = new CPU();
		cpu.setBrand(cpuBrand);
		cpu.setFrequency(cpuFrequency);
		
		String emsType = new EMSFactory().getType();
		String emsCapacity = new EMSFactory().getCapacity();
		EMS ems =new EMS();
		ems.setType(emsType);
		ems.setCapacity(emsCapacity);
		
		String harddisk = new HardDiskFactory().getCapacity();
		
		c.setCpu(cpu);
		c.setEms(ems);
		c.setHarddisk(harddisk);
		
		System.out.println(c);
		
	}
}
